1. Field of the Invention
The invention relates to a method and apparatus for performing color space conversion, more particularly to a method and apparatus for converting digitized luminance-chrominance color space signals to digitized RGB color space signals which utilize shared predictive and compensative transformation codes for chrominance components.
2. Description of the Related Art
It is desirable to merge a video signal with graphic signals in a multi-media computer system. The video signal may come from a television image processing system having a capture or frame grabbing capability, or from a compressed video playback of a CD-ROM, DVD (digital versatile disc) or network transmission. Color space conversion is needed in image processing applications to convert luminance-chrominance color space signals, which offer the advantages of a lower transmission bandwidth and a lower data storage requirement, into RGB color space signals, which are used when displaying an image on a computer monitor.
In digital video applications, it is not uncommon to represent colors of pixel data in YCbCr 4:2:2 spatial resolution format. This means that the chrominance components Cb and Cr of the pixel data are in half resolution relative to the luminance component Y in a horizontal direction of the image since the human visual system is less sensitive to chrominance than luminance. The chrominance components Cb and Cr can be further decimated to YCbCr 4:2:0 or 4:1:1 format that further reduces the spatial resolution by half in a vertical direction of the image in case a compression algorithm is incorporated in the digital video application, such as MPEG, JPEG, etc. As such, both chrominance components Cb and Cr are usually presented alternately with the corresponding luminance component Y. This permits a sharing of resources for manipulating both chrominance components Cb and Cr to consequently reduce the required processing means in the color space conversion.
CCIR 601, which was proposed by the Comite Consultatif International des Radiocommunications (CCIR), establishes the following equations for converting from the YCbCr luminance-chrominance color space to the RGB color space: EQU R=Y+1.402 (Cr-128) (a.1) EQU G=Y-0.714 (Cr-128)-0.344(Cb-128) (a.2) EQU B=Y+1.772 (Cb-128) (a.3)
If U and V are used to represent the shifted chrominance components (Cb-128) and (Cr-128), respectively, the standard set of equations (a.1) to (a.3) can be rewritten as follows: EQU R=Y+1.402V (b.1) EQU G=Y-0.714V-0.344U (b.2) EQU B=Y+1.772U (b.3)
where Y ranges between [0, 255], and U and V range between [-128, 127] in an 8-bit representation for each of the Y, Cb and Cr color space components.
Color space conversion is often implemented by employing multipliers or look-up tables to achieve the matrix multiplication operations. Look-up tables are preferred because of their less complicated constructions. It is noted that the matrix multiplication operations dominate the hardware complexity of a color space converting apparatus. As such, the number of look-up tables is critical in determining the cost of implementing the color space converting apparatus. To implement the YCbCr to RGB color space conversion of equations (a.1) to (a.3), a conventional color space converter usually requires four look-up tables to perform the matrix multiplication of chrominance components. Although the use of four look-up tables is less expensive to implement as compared to another conventional color space converter which uses a 3-by-3 multiplication matrix, a further reduction in the cost of implementing the matrix multiplication of chrominance components is desirable.
In co-pending U.S. patent application Ser. No. 08/872,360, entitled "Method And Apparatus Requiring Fewer Number of Look-Up Tables For Converting Luminance Chrominance Color Space Signals To RGB Color Space Signals," and filed on Jun. 10, 1997 by the Applicant, it has been proposed that, by linearly combining the conversion formulas, equations (b.1) to (b.3) can be rearranged as follows to result in RGB color combination signals: EQU R-G=0.714 (2V)+0.344 (U+2V) (c.1) EQU B-G=0.714 (2U+V)+0.344 (2U) (c.2) EQU R+B-G=Y+0.714 (2U+2V)+0.344 (2U+2V) (c.3) EQU B+G=2Y+0.714 (2U-V) (c.4) EQU R+G=2Y+0.344 (2V-U) (c.5)
Equations (c.1) to (c.5) list a set of possible linear combinations of equations (b.1) to (b.3). Consequently, as equations (c.1) to (c.5) use only two coefficients, namely 0.714 and 0.344, for matrix multiplications, no more than two look-up tables may be used to convert luminance-chrominance color space signals to RGB color combination signals. Therefore, conversion from the luminance-chrominance color space to the RGB color space can be implemented using fewer than four look-up tables by converting the luminance-chrominance color space signals to the RGB color combination signals expressed as a function of predetermined linear combinations of the chrominance color space signals as defined by the appropriate conversion formulas, and by linearly combining the resulting RGB color combination signals to obtain the RGB color space signals.
The apparatus disclosed in the aforementioned U.S. Patent Application comprises: a first combining unit for generating a plurality of linear combinations of the chrominance color space signals and at least one binary combination of the luminance color space signal; a multiplexed multiplication unit connected to the first combining unit to receive the linear combinations of the chrominance color space signals therefrom, the multiplexed multiplication unit including no more than two look-up tables which contain digitized transformation values for performing matrix multiplications of the linear combinations of the chrominance color space signals; a second combining unit connected to the multiplexed multiplication unit and the first combining unit, the second combining unit linearly combining the digitized transformation values outputted by the multiplexed multiplication unit and the binary combination of the luminance color space signal to generate three RGB color combination signals; and a third combining unit connected to the second combining unit, the third combining unit linearly combining the RGB color combination signals to obtain the RGB color space signals.